<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: Media
  Date: 2022/10/4
  Time: 15:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加购物车</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    String choice[]=request.getParameterValues("book");

    ArrayList books = new ArrayList();

    for(int i=0;i<choice.length;i++)
        books.add(choice[i]);
    session.setAttribute("books", books);
%>
添加成功
<br>
<a href="结果.jsp">查看结果</a>
</body>
</html>
